package com.wf.protobuf.builder;

import com.wf.protobuf.domain.ProtoMsg;

/**
 * 构造protobuf消息对象
 *
 * @author wf
 * @since 2022/5/28
 */
public class ProtobufMsgBuilder {
    public static ProtoMsg buildMsg(Integer id, String content) {
        ProtoMsg.Builder builder = ProtoMsg.newBuilder();
        builder.setId(id);
        builder.setContent(content);
        return builder.build();
    }
}

